<!doctype html>
<html class="no-js fixed-layout" xmlns:th="http://www.thymeleaf.org">
<head th:include="admin/include/admin-head-include"></head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<header th:include="admin/include/admin-header-include" class="am-topbar am-topbar-inverse admin-header"></header>

<div class="am-cf admin-main">
    <!-- sidebar start -->
    <div th:include="admin/include/admin-sidebar-include" class="admin-sidebar am-offcanvas"
         id="admin-offcanvas"></div>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">图书管理</strong>
                </div>
            </div>
            <hr>
            <table class="am-table am-table-striped am-table-hover">
                <thead>
                <tr>
                    <th>#</th>
                    <th>书名</th>
                    <th>作者</th>
                    <th>封皮</th>
                    <th>在架子</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="book,start:${books}">
                    <td th:text="${start.index+1}"></td>
                    <td th:text="${book.bookname}"></td>
                    <td th:text="${book.author}"></td>
                    <td><img th:src="${book.image}" width="100" alt=""></td>
                    <td th:text="${book.count}"></td>
                    <td>
                        <div class="am-dropdown" data-am-dropdown>
                            <button class="am-btn am-btn-default am-btn-xs am-dropdown-toggle" data-am-dropdown-toggle>
                                <span class="am-icon-cog"></span> <span class="am-icon-caret-down"></span></button>
                            <ul class="am-dropdown-content">
                                <li><a th:href="@{/admin/books/edit(id=${book.bookId})}">1. 编辑</a></li>
                                <li><a th:href="@{/admin/books/delete(id=${book.bookId})}">2. 删除</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>

                </tbody>
            </table>

        </div>

        <footer th:include="admin/include/admin-footer-include" class="admin-content-footer"></footer>
    </div>
    <!-- content end -->

</div>

<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
   data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

</body>
</html>
